Skip to content
This repository was archived by the owner on Apr 28, 2020. It is now read-only.

Only add commas between array elements when needed #10

Merged
merged 1 commit into from
Aug 25, 2018

Conversation

mcraiha
Copy link
Contributor

@mcraiha mcraiha commented Aug 18, 2018

Old behavior:
[1, -> [1,2, etc.
New behavior:
[1 -> [1,2 etc.

This fixes at least following tests:
ArrayValuesTest
MultipleArrayValuesTest
NestedArraysTest
EmptyStringSpaceTest

This fixes at least following tests: ArrayValuesTest
MultipleArrayValuesTest
NestedArraysTest
EmptyStringSpaceTest
@jordanbtucker
Copy link
Member

Thanks. I'm going to merge this, but it might get replaced in the future by code that is based on the way JSON5.stringify handles arrays, which is in turn based on how ES6 stringify handles arrays.

@jordanbtucker jordanbtucker merged commit 83f2b06 into json5:master Aug 25, 2018
@mcraiha mcraiha deleted the array-ending-comma branch August 25, 2018 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants